<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
     <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<fmt:setBundle basename="Messages" />
<c:set var="t" value="true" />
<title><fmt:message key="Display.CreateStaffTitle" /></title>
<script type="text/javascript"
	src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>
<style type="text/css">
* {
	font-family: Verdana;
	font-size: 96%;
}

label {
	width: 10em;
	float: left;
}

label.error {
	float: none;
	color: red;
	padding-left: .5em;
	vertical-align: top;
}

p {
	clear: both;
}

.submit {
	margin-left: 12em;
}

em {
	font-weight: bold;
	padding-right: 1em;
	vertical-align: top;
}
</style>
<script>
	$(document).ready(function() {
		$("#commentForm").validate();
	});
</script>
</head>
<body>
<img src="img/logo_ISS.jpg" class="logo" />
	<div class="header">
		<div style="float: left; margin: 11px auto 0 auto">
			<h1>
				<fmt:message key="Display.InstituteofSystemScience" />
			</h1>
		</div>
		<div style="float: right; margin: 11px auto 0 auto">
			<h1>
				<fmt:message key="Display.FacilitiesBookingSystem" />
			</h1>
		</div>
	</div>
	<div class="site_content">
		<div class="sidebar_container">
			<div class="sidebar">
				
							<%@include file="adminSideMenu.jsp" %>
				
				<c:if test=""></c:if>
				
				<c:if test=""></c:if>
			</div>
		</div>

		<div class="content">
<h2 align="center"><fmt:message key="Display.CreateHeader" /></h2>
	<form method="post" action="CreateStaffServlet" class="cmxform" id="commentForm">
	
	<c:if test="${insert==t }">
		<table style=" margin: 10px 0 0px 0;background:#FFF;width:450px;height:200px;border:2px;border-style:solid;border-color:#696A6A">
			<tr>
				<td>
					<fmt:message key="Display.StaffID"/>
				</td>
				<td>
				
				
					<input type="text" name="staffID" id="staffID" class="required" >
					<input type="hidden" name="hide" value="insert">
				
				</td>
				<td>
					<fmt:message key="Display.Role"/>
				</td>
					
				<td>
					<select name="role">
						
						<option><fmt:message key="Display.Staff"/></option>
						<option><fmt:message key="Display.Admin"/></option>
						<option><fmt:message key="Display.Manager"/></option>
						
					</select>
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.Name"/>
				</td>
				<td>
					<input type="text" name="name" id="name" class="required">
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.Reportto"/>
				</td>
				<td>
				<select name="reportto"> 
						<c:forEach var="manager" items="${managers}"> 
				<option value=${manager }>${manager }</option> 
				</c:forEach>
					</select>
					
					
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.Email"/>
				</td>
				<td>
					<input type="text" name="email" id="email" class="required">
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.Phone"/>
				</td>
				<td>
					<input type="text" name="phone" id="phone" class="required">
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.SecurityQ"/>
				</td>
				<td>
					<input type="text" name="securityQ" id="securityQ" class="required">
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.SecurityA"/>
				</td>
				<td>
					<input type="text" name="securityA" id="securityA" class="required">
				</td>
			</tr>
			
		</table>
		</c:if>
		<c:if test="${param['update']==t}" >
			 	<table style=" margin: 10px 0 0px 0;background:#FFF;width:450px;height:200px;border:2px;border-style:solid;border-color:#696A6A">
			<tr>
				<td>
					<fmt:message key="Display.StaffID"/>
				</td>
				<td>
				
				
					<input type="text" name="staffID" value="${param['staffID']}" readonly="readonly">
					<input type="hidden" name="hide" value="update">
				
				</td>
				<td>
					<fmt:message key="Display.Role"/>
				</td>
					
				<td>
					<select name="role">
						
						<option><fmt:message key="Display.Staff"/></option>
						<option><fmt:message key="Display.Admin"/></option>
						<option><fmt:message key="Display.Manager"/></option>
						<option disabled selected>${param['role']}</option>
					</select>
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.Name"/>
				</td>
				<td>
					<input type="text" name="name" value="${param['name']}" id="name" class="required">
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.Reportto"/>
				</td>
				<td>
				<select name="reportto"> 
						<c:forEach var="manager" items="${managers}"> 
				<option value=${manager }>${manager }</option> 
				</c:forEach>
				<option selected disabled>${param['reportto']}</option>
					</select>
					
					
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.Email"/>
				</td>
				<td>
					<input type="text" name="email" value="${param['email']}" id="email" class="required">
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.Phone"/>
				</td>
				<td>
					<input type="text" name="phone"  value="${param['phone']}" id="phone" class="required">
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.SecurityQ"/>
				</td>
				<td>
					<input type="text" name="securityQ"  value="${param['securityQ']}" id="securityQ" class="required">
				</td>
			</tr>
			<tr>
				<td>
					<fmt:message key="Display.SecurityA"/>
				</td>
				<td>
					<input type="text" name="securityA" value="${param['securityA'] }" id="securityA" class="required">
				</td>
			</tr>
			
		</table>
		</c:if>
			<input type="submit" value="Submit" class="ButtonStyle">

		
	</form>
	</div>

	</div>

	<div class="footer" style="align: center">Copyright@ Team3
		Erudites</div>
	
</body>
</html>